#include <MyButton.h>
#include <QtGui>

MyButton::MyButton(QWidget *parent)
    :QPushButton(parent)
{
    mentionLabel = new QLabel;
}

void MyButton::enterEvent(QEvent *event)
{
    if(!this->isEnabled()){
        mentionLabel->setText("Please choose files first.");
        mentionLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
    }else{
         mentionLabel->setText("");
    }
}

void MyButton::leaveEvent(QEvent *event)
{
   mentionLabel->setText("");
}

void MyButton::setMentionLabel(QLabel *label){
    mentionLabel = label;
}
